package entity;

import entity.myEnum.Role;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.io.Serializable;

/**
 * (Users)实体类
 *
 * @author makejava
 * @since 2024-04-22 12:33:38
 */
public class Users implements Serializable {
    private static final long serialVersionUID = 489898479724318784L;


    /**
     * 用户ID，主键
     */
    private Integer id;
    /**
     * 用户名
     */
    private String name;
    /**
     * 密码（加密存储）
     */
    private String password;
    /**
     * 电子邮件
     */
    private String email;
    /**
     * 电话号码
     */
    private String phoneNumber;
    /**
     * 用户角色，枚举类型
     */
    @Enumerated(EnumType.STRING)
    private Role role;

    @Override
    public String toString() {
        return id + name + password + email + phoneNumber + role;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }
}

